const conf = new (require('conf'))()
const chalk = require('chalk')
const TaskAPI = require('./../api/task');
async function add (task) {
    //get the current todo-list
    const taskAPI = new TaskAPI();
    await taskAPI.insert({
        text: task
    })

    //display message to user
    console.log(
        chalk.green.bold('Task has been added successfully!')
    )
}
module.exports = add;
